package com.isotronica.neveras.logica;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class VirtualConsoleClient extends Thread{
	
	private Socket miSocket;
	private Thread miThread;
	private VirtualConsoleManager virtualConsoleManager;
	private Controlador miControlador;
	
	
	public VirtualConsoleClient(Controlador miControlador) {
		try {
			this.miControlador = miControlador;
			miSocket = new Socket("190.9.73.61",3010);			
			miThread = new Thread(this);
			miThread.start();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public void run(){
		
		virtualConsoleManager = new VirtualConsoleManager(miSocket,
				miControlador);
		System.out.println("Sesion virtual aceptada");
		
	}

}
